/**
 * Created by zengxm on 12/29/2016.
 */

const versionStr="Ubuntu 14.04.1 LTS \n \l"
const Format=require("util").format
const U=require("../../core/Utils")

const sourcesFile="/etc/apt/sources.list"

var v=/\s([^ ]*)\s/.exec(versionStr) || []
if(v!=null){
    var version = v[1]
    console.log("版本为："+version)
    console.log("toDouble="+parseFloat(version))
}


console.log("deb http://mirrors.aliyun.com/ubuntu/ #version# main restricted universe multiverse #version##version#".replace(/#version#/g,"RAIN".toLowerCase()))

console.log(Format)
console.log(Format('%s:%s', 'foo',"name"))
console.log(Format("cp %s %s.%s", sourcesFile,sourcesFile, U.date("yyyyMMdd")))